<?php

class Application_Form_PosisiForm extends Zend_Form
{

    public function init()
    {
        $this->setMethod('post');
        $this->setName('posisi_form');
        
        $id = new Zend_Form_Element_Hidden('id_posisi');
        $id->addFilter('Int');
        
        $nama_posisi = new Zend_Form_Element_Text('nama_posisi');
        $nama_posisi->setLabel('Position')
                        ->addErrorMessage('Masukkan Posisi')
                        ->setRequired(true);
        
        $keterangan_posisi = new Zend_Form_Element_Textarea('keterangan_posisi');
        $keterangan_posisi->setLabel('Description')
                              ->setAttribs(array( 'cols'=> '60', 'rows' => '5'
                                      ));
        
        $tambah = new Zend_Form_Element_Submit('tambah');
        $tambah->setLabel('Add Position');
        
        $reset = new Zend_Form_Element_Reset('reset');
        $reset->setLabel('Reset');
        
        $this->addElements(array($nama_posisi,$keterangan_posisi,$tambah,$reset,$id));
    }

}

